package BC104_最高身高;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[][] num = new int[n][m];
        int max = 0;
        int x = 0;
        int y = 0;
        for (int i = 0; i < n; i++){
            for (int j = 0; j < m; j++){
                num[i][j] = sc.nextInt();
                if (num[i][j] > max){
                    max = num[i][j];
                    x = i;
                    y = j;
                }
            }
        }
        System.out.printf("%d %d", x + 1, y + 1);


    }
}
